package com.woniuxy.dal.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 靶场类型表
 * @TableName rangeType
 */
@TableName(value ="rangeType")
@Data
public class Rangetype implements Serializable {
    /**
     * 靶场类型Id
     */
    @TableId(value = "rangeTypeId")
    private Integer rangeTypeId;

    /**
     * 靶场类型名称
     */
    @TableField(value = "rangeTypeName")
    private String rangeTypeName;

    /**
     * 靶场类型描述
     */
    @TableField(value = "rangeTypeDetail")
    private String rangeTypeDetail;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Rangetype other = (Rangetype) that;
        return (this.getRangeTypeId() == null ? other.getRangeTypeId() == null : this.getRangeTypeId().equals(other.getRangeTypeId()))
            && (this.getRangeTypeName() == null ? other.getRangeTypeName() == null : this.getRangeTypeName().equals(other.getRangeTypeName()))
            && (this.getRangeTypeDetail() == null ? other.getRangeTypeDetail() == null : this.getRangeTypeDetail().equals(other.getRangeTypeDetail()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getRangeTypeId() == null) ? 0 : getRangeTypeId().hashCode());
        result = prime * result + ((getRangeTypeName() == null) ? 0 : getRangeTypeName().hashCode());
        result = prime * result + ((getRangeTypeDetail() == null) ? 0 : getRangeTypeDetail().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", rangeTypeId=").append(rangeTypeId);
        sb.append(", rangeTypeName=").append(rangeTypeName);
        sb.append(", rangeTypeDetail=").append(rangeTypeDetail);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}